/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author XPF
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface SportsPlan extends BasicModel<SportsPlan> {
  planId?: string; // 考核主键
  adaptAcademicYear?: string; // 适配学年（多项）
  adaptGrade?: string; // 适配年级（多项）
  sportsPlanCheckItemsList?: any[]; // 子表列表
}

export const sportsPlanList = (params?: SportsPlan | any) =>
  defHttp.get<SportsPlan>({ url: adminPath + '/physical/sportsPlan/list', params });

export const sportsPlanListData = (params?: SportsPlan | any) =>
  defHttp.post<Page<SportsPlan>>({ url: adminPath + '/physical/sportsPlan/listData', params });

export const sportsPlanListCopy = (params?: any, data?: SportsPlan | any) =>
  defHttp.post<Page<SportsPlan>>({ url: adminPath + '/physical/sportsPlan/copy', params, data });

export const sportsPlanForm = (params?: SportsPlan | any) =>
  defHttp.get<SportsPlan>({ url: adminPath + '/physical/sportsPlan/form', params });

export const sportsPlanSave = (params?: any, data?: SportsPlan | any) =>
  defHttp.postJson<SportsPlan>({ url: adminPath + '/physical/sportsPlan/save', params, data });

export const sportsPlanDelete = (params?: SportsPlan | any) =>
  defHttp.get<SportsPlan>({ url: adminPath + '/physical/sportsPlan/delete', params });
